<?php /* Smarty version Smarty-3.1.12, created on 2015-11-21 06:43:30
         compiled from "/Applications/XAMPP/xamppfiles/htdocs/asus/protected/views/activity/checkIn.html" */ ?>
<?php /*%%SmartyHeaderCode:1877604673564fa21274b5c9-98090393%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '64a2b2e0ecccdcd390bbdc6955074ec3a9d1d4bd' => 
    array (
      0 => '/Applications/XAMPP/xamppfiles/htdocs/asus/protected/views/activity/checkIn.html',
      1 => 1448059075,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1877604673564fa21274b5c9-98090393',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.12',
  'unifunc' => 'content_564fa2127693c7_87914346',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_564fa2127693c7_87914346')) {function content_564fa2127693c7_87914346($_smarty_tpl) {?><!DOCTYPE html>
<html lang=zh-cn>

<head>
    <meta http-equiv=Content-Type content="text/html; charset=utf-8">
    <meta name=viewport content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no">
    <title>签到 | 华硕Zenfone2粉丝趴</title>
    <meta name=apple-mobile-web-app-capable content=yes>
    <link rel=stylesheet href=http://gdqyzs.u.qiniudn.com/asus_mobile.min.css>
</head>

<body>
    <div id=content class=content>
        <div id=error_tips style="display:none;">
            <div id=error_tips_content><span id=error_icon></span><span id=error_message>您还没有输入手机号码！</span></div>
        </div>
        <div id=login class=login>
            <div id=logo class=logo></div>
            <div id=app_name style=display:none></div>
            <div id=web_login>
                <ul id=g_list>
                    <li id=g_u>
                        <div id=del_touch class=del_touch><span id=del_u class=del_u></span></div>
                        <input type=text id=user class=inputstyle autocomplete=off placeholder="姓名">
                        <li id=g_u>
                            <div id=del_touch class=del_touch><span id=del_u class=del_u></span></div>
                            <input type=text id=mobile class=inputstyle autocomplete=off placeholder="手机" onchange="value=value.replace(/[^\d]/g,'')">
                </ul>
                <div id=go href="javascript:void(0);">签 到</div>
            </div>
        </div>
    </div>
    <div class=footer><img src=http://gdqyzs.u.qiniudn.com/asus-footer.png?v1></div>
    <script src=http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js></script>
    <script src=http://res.wx.qq.com/open/js/jweixin-1.0.0.js></script>
    <script>
    function setCookie(b, f, a) {
        var e = new Date();
        e.setTime(e.getTime() + a * 24 * 60 * 60 * 1000);
        var c = "expires=" + e.toUTCString();
        document.cookie = b + "=" + f + "; " + c
    }

    function getCookie(d) {
        var b = d + "=";
        var a = document.cookie.split(";");
        for (var e = 0; e < a.length; e++) {
            var f = a[e];
            while (f.charAt(0) == " ") {
                f = f.substring(1)
            }
            if (f.indexOf(b) == 0) {
                return f.substring(b.length, f.length)
            }
        }
        return ""
    }
    $(document).ready(function() {
        var b = $("#user");
        var c = $("#mobile");
        var e = $("#go");
        e.click(function() {
            if (a()) {
                if (getCookie("username") == c.val()) {
                    alert("您已经签过到了哦!");
                    setTimeout(wx.closeWindow(), 5000);
                    return false
                }
                $.post('{:U("Index/Index/post")}', {
                    user: b.val(),
                    mobile: c.val()
                }, function(f) {
                    if (f.status == 0) {
                        setCookie("username", c.val(), 1);
                        alert(f.msg);
                        setTimeout(wx.closeWindow(), 5000)
                    } else {
                        alert(f.msg)
                    }
                })
            }
        });

        function a() {
            if (b.val() == "") {
                d("请输入您的姓名");
                b.focus();
                return false
            } else {
                if (c.val() == "") {
                    d("请输入您的手机号码！");
                    c.focus();
                    return false
                } else {
                    if (c.val().length != 11) {
                        d("请输入正确的手机号码！");
                        c.focus();
                        return false
                    }
                }
            }
            return true
        }

        function d(f) {
            errTips = $("#error_tips");
            errMsg = $("#error_message");
            errMsg.text(f);
            errTips.show();
            setTimeout("errTips.hide()", 7000)
        }
    });
    </script>
<?php }} ?>